home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 12: Textmags & Docs / nf_archive_12.iso / MAGS / SOURCES / ATARI_SRC.ZIP / atari source / AHDI / TTDRIVER / GETSTART.H < prev    next >
Encoding:
C/C++ Source or Header  |  2001-02-09  |  2.4 KB  |  103 lines

  1. /* ________
  2. ** getstart header file
  3. ** atari corp    (1 March 1988)  asm
  4. **
  5. ** see GETSTART(3) manual pages
  6. **
  7. ** $Header$
  8. ** $Source$
  9. ** $Author$
  10. **
  11. ** $Revision$
  12. ** $Date$
  13. ** $State$
  14. ** $Locker$
  15. ** $Log$
  16. */
  17.  
  18.  
  19.  
  20. /*
  21. ** Getstart information structure.
  22. */
  23.  
  24. typedef struct                /* GSINFO getstart information */
  25.     {
  26.        int gs_count;        /* current cluster link count */
  27.        int gs_prev;            /* previous cluster number */
  28.        int gs_head;            /* head cluster number */
  29.        int gs_dsect;        /* directory logical sector */
  30.        int gs_doff;            /* directory byte offset */
  31.        char gs_fpath[256];        /* file path string (packed) */
  32.     } GSINFO;
  33.  
  34.  
  35.  
  36. /*
  37. ** Function declarations.
  38. */
  39.  
  40. extern GSINFO *getstart ();
  41. extern int *fatck ();
  42.  
  43.  
  44.  
  45. /*
  46. ** Getstart errors.
  47. */
  48.  
  49. # define    GFAIL    (0L)        /* miscellaneous misdemeanor */
  50. # define    GORPH    (-1L)        /* orphan in FAT allocation chain */
  51. # define    GALLO    (-2L)        /* current cluster not allocated */
  52. # define    GOOFY    (-3L)        /* FAT not validated by fatck */
  53.  
  54.  
  55.  
  56. /*
  57. ** Fatck errors.
  58. */
  59.  
  60. # define    FFAIL    (0L)        /* miscellaneous misdemeanor */
  61. # define    FFATS    (-1L)        /* FAT read error */
  62. # define    FROOT    (-2L)        /* root directory read error */
  63. # define    FCONF    (-3L)        /* conflicting FAT entry */
  64. # define    FAMBI    (-4L)        /* ambiguous FAT entry reference */
  65.  
  66.  
  67.  
  68. /*
  69. ** File system definitions (from fs.h).
  70. */
  71.  
  72. typedef struct                /* FCB file control block */
  73.     {
  74.        char f_name[11];        /* file name with extension */
  75.        char f_attrib;        /* file attribute */
  76.        char f_fill[10];        /* reserved */
  77.        int f_time;            /* file modification time */
  78.        int f_date;            /* file modification date */
  79.        int f_clust;            /* file starting cluster number */
  80.        long f_fileln;        /* file size in bytes */
  81.     } FCB;
  82.  
  83. # define    FN_FRE    (0x00)        /* file name never used */
  84. # define    FN_DEL    (0xe5)        /* file name deleted */
  85. # define    FN_DIR    (0x2e)        /* directory entry */
  86.  
  87. # define    FA_SUB    (0x10)        /* subdirectory entry */
  88.  
  89. typedef struct                /* BPB bios parameter block */
  90.     {
  91.        int recsiz;            /* record size in bytes */
  92.        int clsiz;            /* records per cluster */
  93.        int clsizb;            /* bytes per cluster */
  94.        int rdlen;            /* root directory length in records */
  95.        int fsiz;            /* FAT size in records */
  96.        int fatrec;            /* first FAT record of second FAT */
  97.        int datrec;            /* first data record */
  98.        int numcl;            /* available data clusters */
  99.        int b_flags;            /* flags */
  100.     } BPB;
  101.  
  102. # define    BF_F16    (0x0001)    /* 16-bit FAT entries, else 12-bit */
  103.